import axios from 'axios'
let baseUrl = '/api'

axios.defaults.headers.post["Content-Type"] ="application/json";

export const oGet = async(url,params) =>{
  try{
    let res = await axios.get(url,params)
    return res
  }
  catch (err) {
    if(err){console.log(err)}
  }
}

export const getOftenGoodsData = (params) =>{
  return oGet('http://jspang.com/DemoApi/oftenGoods.php')
}
export const getTypeData = (params) =>{
  return oGet('http://jspang.com/DemoApi/typeGoods.php')
}